<div class="tales_stats_menu">
    <ui>
        <li class="tales_of_deonia"><?php echo __(LANG_TALES_OF_DEONIA)?></li>
        <?php if(!empty($err_msg)) {?>
            <li class="error_message" style="margin-left: 100px;margin-top: 3px">
                <?php echo $err_msg?>
            </li>
        <?php }?>
        <?php if(!empty($sus_msg)) {?>
            <li class="success_message" style="margin-left: 100px;margin-top: 3px">
                <?php echo "aaaaaaaaa"?>
            </li>
        <?php }?>
    </ui>
</div>

<!-- 유저 셋팅 메뉴 -->
<div class="tales_stats_menu">
    <ul>
        <li class="actions">
            <?php echo $this->Html->link(__('Back'), array(
                'action' => 'user_select',
                'id' => $this->passedArgs['id'],
                'search_value' => $this->passedArgs['search_value'],
                'char_serial' => empty($this->passedArgs['char_serial']) ? '' : $this->passedArgs['char_serial'],
            ));?>
        </li>
    </ul>
</div>

<div>
    <div class="panel ui-widget-content ui-corner-all">
        <?php echo $this->element('slide_user_search',array(
                'id' => $this->passedArgs['id'],
                'search_value' => $this->passedArgs['search_value'],
                )
        ); ?>
    </div>
    <div class="account_info_div">
        <div class="account_info_edit_div_top">
            <div class="account_info_edit_div_top_one">
                <div class="div_title"><?php echo __(LANG_ACCOUNT_INFO)?></div>
                <div>
                    <?php echo $this->Form->create('edit_info');?>
                    <?php echo $this->Form->hidden('a2x_id', array(
                        'label' => false,
                        'value' => $this->passedArgs['id']
                    ));?>
                </div>
                <table>
                    <tr>
                        <th class="user_edit"><?php echo __(LANG_NICKNAME)?></th>
                        <td class="user_info_edit_set2">
                            <?php echo $user_data['tbl_account']['nickname']?>
                        </td>
                    </tr>
                    <tr>
                        <th class="user_edit"><?php echo __(LANG_GEM)?></th>
                        <td class="user_info_edit user_info_edit_set1">
                            <?php echo $this->Form->input('gem', array(
                                'label' => false,
                                'type' => 'text',
                                'value' => $user_data['tbl_account']['gem']
                            ));?>
                        </td>
                    </tr>
                    <tr>
                        <th class="user_edit"><?php echo __(LANG_BLOCK)?></th>
                        <td class="user_info_edit_set2">
                            <?php echo $this->Form->input('block', array(
                                'label' => false,
                                'type' => 'select',
                                'options' => array(1 => 'O', 0 => 'X'),
                                'value' => $user_data['tbl_account']['block']
                            ))?>
                        </td>
                    </tr>
                    <tr>
                        <th class="user_edit"><?php echo __(LANG_CREATE_ACCOUNT)?></th>
                        <td class="user_info_edit_set2">
                            <?php echo $user_data['tbl_account']['register_date']?>
                        </td>
                    </tr>
                    <tr>
                        <th class="user_edit"><?php echo __(LANG_LAST_LOGIN)?></th>
                        <td class="user_info_edit_set2">
                            <?php echo $user_data['tbl_account']['last_login_date']?>
                        </td>
                    </tr>
                </table>
            </div>

            <div class="account_info_edit_div_top_two">
                <div class="div_title"><?php echo __(LANG_CHARACTER_LIST)?></div>
                <table>
                    <tr>
                        <th style="width: 30px"><?php echo __(LANG_NUM)?></th>
                        <th><?php echo __(LANG_NAME)?></th>
                        <th style="width: 83px"><?php echo __(LANG_TYPE)?></th>
                        <th style="width: 43px"><?php echo __(LANG_LEVEL)?></th>
                    </tr>
                    <?php if(!empty($user_character_list)) {?>
                        <?php $num = '';?>
                        <?php foreach($user_character_list as $num => $character) {?>
                            <tr>
                                <td class="user_link">
                                    <?php echo $this->Html->link($num+1, array(
                                            'action' => 'user_select_edit',
                                            'id' => $character['tbl_character']['a2x_id'],
                                            'char_serial' => $character['tbl_character']['char_serial'],
                                            'search_value' => $this->passedArgs['search_value'],
                                        ));?>
                                </td>
                                <td class="user_link">
                                    <?php echo $this->Html->link($character['tbl_character']['char_name'], array(
                                        'action' => 'user_select_edit',
                                        'id' => $character['tbl_character']['a2x_id'],
                                        'char_serial' => $character['tbl_character']['char_serial'],
                                        'search_value' => $this->passedArgs['search_value'],
                                    ));?>
                                </td>
                                <td class="user_link">
                                    <?php echo $this->Html->link($character['tbl_character']['char_type'], array(
                                        'action' => 'user_select_edit',
                                        'id' => $character['tbl_character']['a2x_id'],
                                        'char_serial' => $character['tbl_character']['char_serial'],
                                        'search_value' => $this->passedArgs['search_value'],
                                    ));?>
                                </td>
                                <td class="user_link">
                                    <?php echo $this->Html->link($character['tbl_character']['level'], array(
                                        'action' => 'user_select_edit',
                                        'id' => $character['tbl_character']['a2x_id'],
                                        'char_serial' => $character['tbl_character']['char_serial'],
                                        'search_value' => $this->passedArgs['search_value'],
                                    ));?>
                                </td>
                            </tr>
                        <?php }?>
                    <?php }?>
                </table>
            </div>


            <div class="account_info_edit_div_top_three">
                <?php if(empty($this->passedArgs['char_serial'])) {?>
                    <div class="div_title"><?php echo __(LANG_CHARACTER_INFO)?></div>
                    <p class="info_empty_text "><?php echo __(LANG_CHOOSE_CHAR)?></p>
                <?php }?>
                <?php if(!empty($this->passedArgs['char_serial'])) {?>
                    <div class="div_title"><?php echo __(LANG_CHARACTER_INFO . '(' . $character['tbl_character']['char_name'] . ')')?></div>
                    <table>
                        <tr>
                            <th class="user_edit"><?php echo __(LANG_GOLD)?></th>
                            <td class="user_info_edit user_info_edit_set1">
                                <?php echo $this->Form->input('gold', array(
                                    'label' => false,
                                    'type' => 'text',
                                    'value' => $character['tbl_character']['gold']
                                ));?>
                            </td>
                        </tr>
                        <tr>
                            <th class="user_edit"><?php echo __(LANG_ENERGY)?></th>
                            <td class="user_info_edit user_info_edit_set1">
                                <?php echo $this->Form->input('energy', array(
                                    'label' => false,
                                    'type' => 'text',
                                    'value' => $character['tbl_character']['energy']
                                ));?>
                            </td>
                        </tr>
                        <tr>
                            <th class="user_edit"><?php echo __(LANG_EXP)?></th>
                            <td class="user_info_edit user_info_edit_set1">
                                <?php echo $this->Form->input('exp', array(
                                    'label' => false,
                                    'type' => 'text',
                                    'value' => $character['tbl_character']['exp']
                                ));?>
                            </td>
                        </tr>
                        <tr>
                            <th class="user_edit"><?php echo __(LANG_LAST_SAVE)?></th>
                            <td class="user_info_edit_set2"><?php echo $character['tbl_character']['last_save_date']?></td>
                        </tr>
                    </table>
                <?php }?>
            </div>
            <div>
                <div class="actions" style="float: right">
                    <?php echo $this->Form->submit(__(LANG_SEND), array(
                        'label' => false,
                    ));?>
                    <?php echo $this->Form->end();?>
                </div>
            </div>
        </div>
    </div>
</div>

